package tasky.ui;

import tasky.logic.Logic;

/**
 * The UI's first Class. Note that the UI is Singleton and
 * only 1 copy of the BaseWindow (Which contains the components)
 * can be run
 * 
 * @author Keith Lim Yong Ming A0097846J
 *
 */

public class UserInterface {

	private Logic progLogic;
	private BaseWindow mainWindow;

	public UserInterface(Logic log) {
		progLogic = log;
	}

	public void launchTheProg() {
		if(ifMainWindowNotInitialized()) {
			mainWindow = new BaseWindow(progLogic);
		}
		mainWindow.setUp();
	}

	private boolean ifMainWindowNotInitialized() {
		return mainWindow == null;
	}
}